package com.xiaoke.mapper;

import com.xiaoke.entity.Coupon;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CouponMapper {
    int deleteByPrimaryKey(String id);

    int insert(Coupon record);

    int insertSelective(Coupon record);

    Coupon selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Coupon record);

    int updateByPrimaryKey(Coupon record);

    Integer countByUserAndShop(@Param("userId") String userId,@Param("shopId") String shopId);

    List<Coupon> findByUserAndShop(@Param("userId") String userId,@Param("shopId") String shopId);
}